package com.wlsk.license.service.feign;


import com.wlsk.license.common.result.Result;
import com.wlsk.license.dto.request.UserReqDto;
import com.wlsk.license.dto.request.feign.DeptByOrgReqDto;
import com.wlsk.license.dto.request.feign.MerchantReqDto;
import com.wlsk.license.dto.request.feign.OrgReqDto;
import com.wlsk.license.dto.response.feign.DepartResVo;
import com.wlsk.license.dto.response.feign.OrgResVo;
import com.wlsk.license.dto.response.feign.UserOrgResVo;
import com.wlsk.license.dto.response.feign.UserResDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 商家服务
 */
@Component
@FeignClient(value = "merchant", contextId = "merchantFeignClient")
public interface MerchantFeignClient {

    @PostMapping("getUserByUserId")
    Result<UserResDto> getUserByUserId(@RequestBody UserReqDto baseVo);

    @PostMapping("getAllMerchantInfo")
    Result<List> getAllMerchantInfo(@RequestBody MerchantReqDto merchantReqDto);

    @PostMapping("org/info")
    Result<OrgResVo> orgInfo(@RequestBody OrgReqDto reqDto);

    @PostMapping({"org/list"})
    Result<List<OrgResVo>> orgList(@RequestBody OrgReqDto orgVo);

    @PostMapping({"plat/getOrgByUserId"})
    Result<UserOrgResVo> getOrgByUserId(@RequestBody OrgReqDto orgVo);

    @PostMapping({"plat/org/getDeptList"})
    Result<List<DepartResVo>> getDeptListByOrg(@RequestBody DeptByOrgReqDto orgVo);
}
